1. Field of the Invention
This invention relates to potentiometers and more specifically, to a low cost circuit for sensing the state of a potentiometer.
2. Description of the Related Art
Voltage dividers--generally referred to herein as "potentiometers"--are commonly used circuit elements. A typical potentiometer comprises a resistive element, a conductive element, and a wiper that has two or more metal contacts which provide movable electrical contact between points along the elements. As the wiper moves along the elements, it continuously varies the resistance between the conductive element and either end of the resistive element. A voltage across the resistive element is divided by the wiper according to its position along the resistive element, the wiper voltage being determined by the resistance from the wiper to either end of the resistive element.
Another type of potentiometer is the SoftPot.RTM. membrane potentiometer, manufactured by Spectra Symbol, Salt Lake City, Utah. It provides a momentary variable resistance in response to an applied pressure. A membrane potentiometer generally consists of a conductive element co-extensively mounted parallel to a resistive element and separated by a small gap. One or both of the elements are supported by a flexible substrate, which can be deflected (by a finger or the like) to electrically connect corresponding points along the conductive and resistive elements, electrically dividing the resistive element accordingly. The elements separate when the deflecting pressure is released.
Potentiometers are frequently used to adjust some output parameter of an electric control, such as a lighting control. To accomplish this, a circuit must be provided to sense the state of the potentiometer and adjust the control accordingly. If the control circuit is analog, this is easily done via a buffer of some sort connected to the potentiometer wiper. If, on the other hand, the control circuit includes a digital processing step, the sensing circuit must convert an analog signal into a digital signal (A/D conversion). There are many circuits available to do this; however, each suffers from limitations, as discussed below.
A/D conversion by successive approximation involves feeding back various output codes into a D/A converter and comparing this with the input voltage signal via a comparator. Typically, all bits are initially set to 0. Then, beginning with the most significant bit, each bit, in turn, is provisionally set to 1. If the D/A output does not exceed the input voltage signal, the bit is left as a 1; otherwise, it is set back to 0.
Successive-approximation A/D converters are relatively accurate and fast; however, they are expensive and draw a significant amount of current during operation. Furthermore, voltage spikes on the input line are disastrous, and these converters sometimes have nonlinearities and missing codes.
A less expensive A/D conversion method, known as single-slope integration, involves measuring the elapsed time to charge a capacitor from ground to a voltage equivalent to the input voltage signal. To begin conversion, an internal ramp generator is started and, at the same time, a counter is enabled to count pulses from a stable clock. When the ramp voltage equals the input voltage, a comparator stops the counter. The count is proportional to the input level, i.e., it's the digital output. At the end of the conversion, the circuit resets the ramp generator and the counter, and the converter is ready for another cycle. Single-slope integration is simple, but it is not used where high accuracy is required, because it puts severe requirements on the stability and accuracy of the ramp generator and comparator.
The method of dual-slope integration was designed to eliminate most of the ramp generator and comparator problems inherent in single-slope integration. In this method, a current that is accurately proportional to the input level charges a capacitor for a fixed time interval; then, the capacitor is discharged by a constant current until the voltage reaches zero again. The time to discharge the capacitor is proportional to the input level and is used to enable a counter driven from a clock running at a fixed frequency. The final count is proportional to the input level; i.e., it's the digital output.
Dual-slope integration achieves good accuracy without putting extreme requirements on component stability. In particular, the capacitor value doesn't have to be particularly stable, since the charge cycle and the discharge cycle both have a rate inversely proportional to the value of the capacitor. Likewise, drifts or scale errors in the comparator are cancelled out by beginning and ending each conversion cycle at the same voltage. The clock frequency does not have to be highly stable, because the fixed integration time during the first phase of the measurement is generated by subdivision from the same clock used to increment the counter. The dual-slope converter, however, requires that the discharge current be highly stable and that the input current accurately represent the voltage on the potentiometer wiper. Furthermore, this method draws a significant amount of current during operation. In the case of lighting controls, it is desirable to reduce the current drawn by an A/D converter to 5 mA or less to meet certain Underwriters Laboratories specifications.